const debounce = (fn, t) => {
  let delay = t || 500;
  let timer;
  return function () {
    // debugger
    console.log('俺进来了');
    let args = arguments;
    if (timer) {
      clearTimeout(timer);
    }
    timer = setTimeout(() => {
      timer = null;
      fn.apply(this, args);
    }, delay);
  };
};

let  validateNumber = (rule, value, callback) => {
  let reg = /^[0-9]*[1-9][0-9]*$/;
  console.log('----------',value,reg.test(value),rule);
  if (!reg.test(value)) {
      // this.$message.error({ message: '航次数量请输入整数!', duration: 2000 });
      console.log("请输入整数");
      // callback(new Error("请输入整数")),
  } else {
      callback();
  }
}


validateNumber = debounce(validateNumber,500);

validateNumber('',0.33,()=>{
  console.log('成功了');
});